package jintian作业;

import java.io.File;

public class test6 {
    public static void main(String[] args) {
        File srcFile = new File("D:\\workspace\\resp1\\day1\\src\\");
        showDir(srcFile);
    }


    private static void showDir(File srcFile) {
        File[] files= srcFile.listFiles();
        for(File file: files){
            if(file.isFile()){
                System.out.println("文件名"+file.getAbsolutePath());
            }else if (file.isDirectory()) {
                showDir(file);
                System.out.println("目录"+file.getName());

            }
        }
    }

}
   
